﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using VkontakteSharp;
using VkontakteSharp.Model;

namespace VkontakteSharp.Endpoints.Wall {
    public class Authenticated : VkontakteAPI
    {
        public Authenticated(VkontakteConfig config, string authInfo) : base(config, authInfo, "/wall.") { }

        public ResponseClass<WallRecord2<WallRecord>> GetById(string[] postsIds)
        {
            return (ResponseClass<WallRecord2<WallRecord>>)Mapper.Map<ResponseClass<WallRecord2<WallRecord>>>(GetByIdJson(postsIds));
        }

        public string GetByIdJson(string[] postsIds)
        {
            string uri = string.Format(base.Uri + "getById?posts={0}&access_token={1}&extended=1", String.Join(",", postsIds),AuthInfo);
            return HttpClientOld.GET(uri);
        }
    }
}
